package cn.niit.smbms.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;

/**
 * @author xiaomi
 */
@ControllerAdvice(basePackages = "cn.niit.smbms.controller.admin")
public class AdminExceptionHandler extends ResponseEntityExceptionHandler {

    @ExceptionHandler(value = RuntimeException.class)
    public String handleRuntimeException(RuntimeException e){
        // TODO 处理逻辑：当程序发生异常后，需要如何处理
        return "error/500";
    }
}
